import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:freedom/util/navigator_provider.dart';
import '../page/mahjong/gaming_page.dart';

class InsertHome {
  static void addHome(BuildContext context, String roomType, String roomCode,
      {Object? record}) {
    List mahjongHome = ["WZ_MAHJONG", "CD_MAHJONG"];
    if (mahjongHome.contains(roomType)) {
      NavigatorProvider.pushAndRemoveUntil(
          GamingIndexPage(roomCode, record: record));
    }
  }
}
